home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / hdf / unix / hdf3_2r2.lha / HDF3.2r2 / Makefile.Template < prev    next >
Encoding:
Makefile  |  1992-10-28  |  4.6 KB  |  188 lines

  1. #
  2. # $Header: /hdf/hdf/v3.2r2/top/RCS/Makefile.Template,v 1.7 1992/10/28 20:45:06 koziol beta koziol $
  3. #
  4. # $Log: Makefile.Template,v $
  5. # Revision 1.7  1992/10/28  20:45:06  koziol
  6. # Updated for v3.2r2
  7. #
  8. # Revision 1.6  1992/08/26  16:26:47  sxu
  9. # *** empty log message ***
  10. #
  11. # Revision 1.5  1992/08/26  16:02:53  sxu
  12. # Added SHELL=/bin/sh
  13. #
  14. # Revision 1.4  1992/08/05  21:47:57  chouck
  15. # Fixed a couple naming convention problems
  16. #
  17. # Revision 1.3  1992/08/05  21:27:30  chouck
  18. # Added support for moving utils to HDFBIN
  19. #
  20. # Revision 1.2  1992/07/22  19:25:34  dilg
  21. # Changed definitions of HDFINC and HDFLIB to be `pwd`/include and `pwd`/lib,
  22. # respectively.
  23. #
  24. # Revision 1.1  1992/07/15  20:12:40  chouck
  25. # Initial revision
  26. #
  27. #
  28. #
  29. # ##################################################################
  30. #
  31. #                   NCSA HDF Version 3.2 release 2
  32. #                          October 1992
  33. #
  34. #           MAKEFILE for creating the HDF library, libdf.a,
  35. #
  36. # This makefile creates the following FORTRAN and C interfaces 
  37. # for HDF in a library called "libdf.a": 
  38. #
  39. #              DFR8   (8-bit raster image sets)
  40. #              DF24   (24-bit raster image sets)
  41. #              DFP    (palettes)
  42. #              DFSD   (scientific data sets)
  43. #              DFAN   (annotations)
  44. #              V      (vsets)
  45. #
  46. # See the file INSTALL for further information on how to invoke
  47. # this makefile.
  48. #
  49. # This release of HDF marks the first use of a new set of lower
  50. # level routines.  The makefile also creates these interfaces,
  51. # which are available in C only.  These routines are categorized 
  52. # as follows:
  53. #
  54. #              H      (lower level i/o)
  55. #              DF     (emulation of old lower level i/o routines)
  56. #              HD     (lower level utilities for developers)
  57. #              HE     (lower level error-handling)
  58. #              HD     (lower level utilities, for developers)
  59. #              DFK    (conversion routines)
  60. #
  61. # ##################################################################
  62. #
  63. #
  64. #
  65. #
  66. # This is the top level Makefile to build HDF 3.2 on Unix based
  67. #       platforms
  68. #
  69. # Possible Machine Types
  70. #   SUN, IBM6000, HP9000, MIPSEL (Dec Mips based machines), ...
  71. #
  72.  
  73. #define your sh shell
  74. SHELL=/bin/sh
  75.  
  76. # Define your machine type
  77. MACHINE=SUN
  78.  
  79. # Define your C compiler and flags
  80. CC= cc
  81. CFLAGS= -D${MACHINE} 
  82.  
  83. # Define your FORTRAN compiler
  84. FC= f77
  85. FFLAGS=
  86.  
  87. # Location where the HDF include files are to be installed
  88. HDFINC= `pwd`/include
  89.  
  90. # Location where the HDF library is to be installed
  91. HDFLIB= `pwd`/lib
  92.  
  93. # Location to put HDF utility executables
  94. HDFBIN= `pwd`/bin
  95.  
  96. # Name of library archiver and flags to send
  97. AR= ar
  98. ARFLAGS= r
  99.  
  100. # Name of achive randomizer (use 'touch' if non-existant)
  101. RANLIB= ranlib
  102.  
  103. # Name of remove utility
  104. RM= /bin/rm
  105. RMFLAGS= -f 
  106.  
  107. #
  108. #
  109. # Flags to recursively send
  110. #
  111.  
  112. HDF_FLAGS       = \
  113.         CC="$(CC)" \
  114.         CFLAGS="$(CFLAGS)" \
  115.         FC="$(FC)" \
  116.         FFLAGS="$(FFLAGS)" \
  117.         RANLIB="$(RANLIB)" \
  118.         AR="$(AR)" \
  119.         ARFLAGS="$(ARFLAGS)" \
  120.         RM="$(RM)" \
  121.         RMFLAGS="$(RMFLAGS)" \
  122.         MACHINE="$(MACHINE)" \
  123.         HDFLIB="$(HDFLIB)" \
  124.         HDFINC="$(HDFINC)" \
  125.     HDFBIN="$(HDFBIN)"    
  126.  
  127. #
  128. #
  129. # General rules
  130. #
  131. all:
  132.     @$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
  133.           SUBDIRS="src util test" _sub message 
  134.  
  135. allnofortran:
  136.     @$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=nofortran \
  137.           SUBDIRS="src util test" _sub message 
  138.  
  139. libnofortran:
  140.     @$(MAKE) $(MYFLAGS) $(HDF_FLAGS) TARG=nofortran \
  141.       SUBDIRS="src" _sub message
  142.  
  143. libnostub: libnofortran
  144.  
  145. allnostub: allnofortran
  146.  
  147. libdf:
  148.     @$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
  149.           SUBDIRS="src" _sub
  150.  
  151. utilities:
  152.     @$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
  153.           SUBDIRS="util" _sub
  154.  
  155. tests:
  156.     @$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
  157.           SUBDIRS="test" _sub
  158.  
  159. #install:      $(INSTALL_DIRS)
  160. #    @$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@  \
  161. #          SUBDIRS="src util test" _sub
  162.  
  163. clean:
  164.     @$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@  \
  165.           SUBDIRS="src util test" _sub
  166.     $(RM) $(RMFLAGS) core *.log
  167.  
  168. _sub:
  169.     @for dir in $(SUBDIRS); do \
  170.           (cd $$dir; echo Making \`$(TARG)\' in `pwd`; \
  171.               $(MAKE) $(MFLAGS) $(HDF_FLAGS) $(TARG)); \
  172.     done
  173.  
  174. message:
  175.     @echo ""
  176.     @echo "***********************************************************"
  177.     @echo " HDF 3.2 library successfully created."
  178.     @echo ""
  179.     @echo "If you have any old vset files (v 1.0) you must use vcompat"
  180.     @echo "to make them compatible with Vset 2.0 applications"
  181.     @echo ""
  182.     @echo "User programs can be created as follows:"
  183.     @echo ""
  184.     @echo "   cc -D${MACHINE} program.c libdf.a -o program"
  185.     @echo ""
  186.     @echo "***********************************************************"
  187.     @echo ""
  188.